home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / print / mspool2.zip / MSPOOL2.DOC < prev   
Text File  |  1985-03-19  |  8KB  |  169 lines

  1.                       Multi Spooler Ver. 2
  2.                          for the IBM PC
  3.                          by Rich Winkel
  4.                           Columbia, Mo.
  5.  
  6.                    For free distribution only
  7.  
  8.                         Mspool2 Features
  9.  
  10.      Allows spooling up to 4 printers simultaneously.
  11.      Supports both parallel and serial printers in any 
  12.           combination.
  13.      Has a user selectable buffer size up to 63K bytes.
  14.      Sensitive to competing demands for CPU time.  Won't 
  15.           slow down foreground jobs.
  16.      Allows cancellation of an on-going print operation.
  17.      Can be 'disabled' for use with programs which are 
  18.           incompatible with it's operation.
  19.  
  20.  
  21. Usage:    
  22.  
  23. To install the spooler, at the DOS prompt type:
  24.  
  25.           MSPOOL a b c
  26. where:
  27.  
  28. a (= 1 - 4) represents the four possible printers on the PC.
  29.             (1, 2 & 3 correspond to LPT1, LPT2 & LPT3)
  30.  
  31. b (= 1 - 9) represents the number of 7K chunks of memory to set 
  32.             aside for the spooler buffer.
  33.  
  34. c (= 1 - 4) is an optional parameter used when you wish the
  35.             output to be directed to a serial port.
  36.             (1 and 2 correspond to COM1 and COM2)
  37.  
  38.      Once the spooler is installed, the user need not worry about 
  39. it further; it will begin intercepting all print operations and 
  40. buffering them.  However, the operation of the spooler can be 
  41. modified after it has been installed, if the need arises.  After 
  42. the spooler has been installed, if you type:
  43.  
  44.           MSPOOL a
  45.  
  46.      where 'a' is the same 'a' you used to install it, you are 
  47. presented with three options: Purge, Disable or Enable.  These 
  48. are as follows:
  49.  
  50. Purge:    Drops any characters remaining in the spooler buffer.  
  51.           This has the effect of canceling any printing operation 
  52.           currently taking place.
  53.  
  54. Disable:  A few programs for the PC operate in a way which 
  55.           interferes with MSPOOL's ability to send characters to 
  56.           the printer.  The result is that MSPOOL captures the 
  57.           characters, but doesn't actually begin printing them 
  58.           until it's buffer is full or you exit your program.  
  59.           'Disabling' the spooler (prior to running your program) 
  60.           keeps the number of characters in it's buffer from 
  61.           growing.  That is, every time the spooler intercepts a 
  62.           character, it prints a character.  If it's buffer is 
  63.           empty, it's as if it wasn't there at all.  It simply 
  64.           prints the character it gets when it gets it.  If there 
  65.           are characters in the buffer at the time the offending 
  66.           program is invoked, then when it gets a character to 
  67.           print, it fetches the next character in line and prints 
  68.           it, and puts the new character at the end of the queue.
  69.           
  70. Enable:   Re-enables spooling.
  71.  
  72.      Hitting any key other than P, D or E has no effect.
  73.  
  74. Notes:    
  75.  
  76.      To spool to a serial printer, first initialize the COM port 
  77. with the MODE command: MODE COMc:baud,parity,databits,stopbits 
  78. etc.  DO NOT use the P (continuous retry) option.  Then install 
  79. MSPOOL: MSPOOL a b c.  This will route all output for LPTa 
  80. through the spooler to the COMc port.  DO NOT use the MODE 
  81. redirect command. (i.e. don't use MODE LPT#:=COMn)
  82.  
  83.      To spool to more than one printer, just run the spooler 
  84. repeatedly, specifying each printer in turn.  
  85.  
  86.      When spooling to more than one printer, in certain 
  87. circumstances (see tech hype below) the last spooler loaded will 
  88. have priority, then the second to last.
  89.  
  90.      In order for the Purge, Disable, Enable routine to work, you 
  91. should load the spooler(s) last among the 'resident' routine(s) 
  92. which affect the operation of any printer.  For instance, if you 
  93. use GRAPHICS.COM, you should run it before running MSPOOL.
  94.  
  95.      Once the spooler is installed, it's output cannot be re-
  96. directed to another port, so programs written for this purpose 
  97. (such as QSWAP) will not work.
  98.  
  99.      The ability to redirect to a COM port could be put to good
  100. use when uploading a large file to another computer when no 
  101. handshaking (XON/XOFF or XMODEM) protocol is required. 
  102. (Especially if you are limited to 300 baud)
  103.  
  104.      More DOS Bugs!  Apparently, FORMAT & DISKCOPY will not work
  105. properly if they do not reside low enough in memory, so if you have
  106. trouble with either of these commands and you have a large spooler
  107. buffer or a lot of resident routines installed, try rebooting
  108. without the resident routines or reduce the spooler buffer size and
  109. try again.  (This problem appears to be similar to the one which
  110. arises if you have too much memory.)
  111.  
  112. Technical hype:
  113.  
  114.      This spooler intercepts 2 interrupts: Printer I/O (INT 17H), 
  115. and Keyboard I/O (INT 16H).  At installation, it stores the old 
  116. vectors for these interrupts internally and substitutes it's own 
  117. addresses in the interrupt vector table.  
  118.      Any call to print is checked as to whether it references the 
  119. spooler's printer.  If not, it is passed on to the the old 
  120. printer I/O handler. (could be another spooler, GRAPHICS.COM, the 
  121. ROM routine etc.)  If it does reference the spooler's printer, 
  122. the character is put in the spooler's buffer, and the buffer is 
  123. checked to see if it's full.  If not, the spooler returns
  124. to the calling program.  Otherwise, the spooler prints the
  125. next character waiting in the buffer, then returns.  If the 
  126. spooler has been 'disabled', it always prints the next character 
  127. in the buffer, regardless of whether the buffer is full.
  128.      Whenever a program makes a keyboard I/O call (INT 16H), the 
  129. spooler checks whether it has a character to print in it's 
  130. buffer.  If not, it passes control to the old keyboard I/O 
  131. routine (could be another spooler, the ROM routine etc.).  
  132. Otherwise, it makes one attempt to print a character.  It then 
  133. checks to see if the keyboard call will require the keyboard I/O 
  134. routine to wait for a character to be entered from the keyboard 
  135. if no character is already in the keyboard buffer.  If not, it 
  136. passes control to the old keyboard I/O handler.  Otherwise, it 
  137. looks at the BUFFER_HEAD and BUFFER_TAIL words in the ROM BIOS 
  138. data area to determine if there is a character in the keyboard 
  139. buffer.  If there is, it passes control.  Otherwise, it begins 
  140. looping, repeatedly attempting to print and checking the keyboard 
  141. buffer until it either runs out of characters or a character is 
  142. entered at the keyboard.  It is during this looping process that 
  143. the most recently installed spooler will get the highest 
  144. priority.  
  145.      Whenever mspool is run, it checks where the printer I/O 
  146. interrupt vector is pointing to determine whether it has already 
  147. been installed.  If it doesn't find a copy of itself there, it 
  148. assumes it is not installed and continues with installation.  If 
  149. there is a copy of itself, it checks to see whether the copy is 
  150. configured to intercept calls to the same printer as was 
  151. specified in it's own parameter list (parm 1). If not, it gets 
  152. the segment for the next printer I/O handler up the line from the 
  153. copy and repeats the same procedure until it either lands in 
  154. unfamiliar territory or finds a spooler configured for it's 
  155. printer.  If it finds one with the proper configuration, it 
  156. presents you with the 'Purge, Disable, Enable' option.  
  157. Otherwise, it continues with installation.
  158.      During installation, the spooler is patched in accordance 
  159. with the parameters passed to it by DOS, to customize for 
  160. parallel or serial printing, buffer size, LPT number and the 
  161. addresses of the old interrupt routines gotten from the interrupt 
  162. vector table.
  163.      The legal ranges for the printer number and serial port number
  164. are due to the fact that there is space for 4 ports in both the
  165. printer and RS-232 tables.
  166. rt number
  167. are due to the fact that there is space for 4 ports in both the
  168. printer and RS-232 tables.
  169.